package com.pipe.commonutils;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @ClassName PageResult
 * @Author HETAO
 * @Date 2020/5/17 11:01
 */
@Data
@NoArgsConstructor
public class PageResult<T> {
    private List<T> items;
    private long total;

    public PageResult(Page page) {
        this.items = page.getRecords();
        this.total = page.getTotal();
    }
}
